Optimal. Leaf size=193 \[ \frac {5 i b d^4 x}{3 c^2}-\frac {88 b d^4 x^2}{105 c}-\frac {5}{9} i b d^4 x^3+\frac {47}{140} b c d^4 x^4+\frac {2}{15} i b c^2 d^4 x^5-\frac {1}{42} b c^3 d^4 x^6+\frac {i d^4 (1+i c x)^5 (a+b \text {ArcTan}(c x))}{5 c^3}-\frac {i d^4 (1+i c x)^6 (a+b \text {ArcTan}(c x))}{3 c^3}+\frac {i d^4 (1+i c x)^7 (a+b \text {ArcTan}(c x))}{7 c^3}+\frac {176 b d^4 \log (i+c x)}{105 c^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.13, antiderivative size = 193, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {45, 4992, 12,
907} \begin {gather*} \frac {i d^4 (1+i c x)^7 (a+b \text {ArcTan}(c x))}{7 c^3}-\frac {i d^4 (1+i c x)^6 (a+b \text {ArcTan}(c x))}{3 c^3}+\frac {i d^4 (1+i c x)^5 (a+b \text {ArcTan}(c x))}{5 c^3}-\frac {1}{42} b c^3 d^4 x^6+\frac {176 b d^4 \log (c x+i)}{105 c^3}+\frac {2}{15} i b c^2 d^4 x^5+\frac {5 i b d^4 x}{3 c^2}+\frac {47}{140} b c d^4 x^4-\frac {88 b d^4 x^2}{105 c}-\frac {5}{9} i b d^4 x^3 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 45
Rule 907
Rule 4992
Rubi steps
\begin {align*} \int x^2 (d+i c d x)^4 \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac {i d^4 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^3}-\frac {i d^4 (1+i c x)^6 \left (a+b \tan ^{-1}(c x)\right )}{3 c^3}+\frac {i d^4 (1+i c x)^7 \left (a+b \tan ^{-1}(c x)\right )}{7 c^3}-(b c) \int \frac {d^4 (i-c x)^4 \left (-1+5 i c x+15 c^2 x^2\right )}{105 c^3 (i+c x)} \, dx\\ &=\frac {i d^4 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^3}-\frac {i d^4 (1+i c x)^6 \left (a+b \tan ^{-1}(c x)\right )}{3 c^3}+\frac {i d^4 (1+i c x)^7 \left (a+b \tan ^{-1}(c x)\right )}{7 c^3}-\frac {\left (b d^4\right ) \int \frac {(i-c x)^4 \left (-1+5 i c x+15 c^2 x^2\right )}{i+c x} \, dx}{105 c^2}\\ &=\frac {i d^4 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^3}-\frac {i d^4 (1+i c x)^6 \left (a+b \tan ^{-1}(c x)\right )}{3 c^3}+\frac {i d^4 (1+i c x)^7 \left (a+b \tan ^{-1}(c x)\right )}{7 c^3}-\frac {\left (b d^4\right ) \int \left (-175 i+176 c x+175 i c^2 x^2-141 c^3 x^3-70 i c^4 x^4+15 c^5 x^5-\frac {176}{i+c x}\right ) \, dx}{105 c^2}\\ &=\frac {5 i b d^4 x}{3 c^2}-\frac {88 b d^4 x^2}{105 c}-\frac {5}{9} i b d^4 x^3+\frac {47}{140} b c d^4 x^4+\frac {2}{15} i b c^2 d^4 x^5-\frac {1}{42} b c^3 d^4 x^6+\frac {i d^4 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^3}-\frac {i d^4 (1+i c x)^6 \left (a+b \tan ^{-1}(c x)\right )}{3 c^3}+\frac {i d^4 (1+i c x)^7 \left (a+b \tan ^{-1}(c x)\right )}{7 c^3}+\frac {176 b d^4 \log (i+c x)}{105 c^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.07, size = 170, normalized size = 0.88 \begin {gather*} \frac {d^4 \left (12 a c^3 x^3 \left (35+105 i c x-126 c^2 x^2-70 i c^3 x^3+15 c^4 x^4\right )+b c x \left (2100 i-1056 c x-700 i c^2 x^2+423 c^3 x^3+168 i c^4 x^4-30 c^5 x^5\right )+12 b \left (-175 i+35 c^3 x^3+105 i c^4 x^4-126 c^5 x^5-70 i c^6 x^6+15 c^7 x^7\right ) \text {ArcTan}(c x)+1056 b \log \left (1+c^2 x^2\right )\right )}{1260 c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 234, normalized size = 1.21
method | result | size |
derivativedivides | \(\frac {d^{4} a \left (\frac {1}{7} c^{7} x^{7}-\frac {2}{3} i c^{6} x^{6}-\frac {6}{5} c^{5} x^{5}+i c^{4} x^{4}+\frac {1}{3} c^{3} x^{3}\right )+\frac {d^{4} b \arctan \left (c x \right ) c^{7} x^{7}}{7}-\frac {2 i d^{4} b \arctan \left (c x \right ) c^{6} x^{6}}{3}-\frac {6 d^{4} b \arctan \left (c x \right ) c^{5} x^{5}}{5}+i d^{4} b \arctan \left (c x \right ) c^{4} x^{4}+\frac {d^{4} b \arctan \left (c x \right ) c^{3} x^{3}}{3}+\frac {5 i d^{4} b c x}{3}-\frac {d^{4} b \,c^{6} x^{6}}{42}+\frac {2 i d^{4} b \,c^{5} x^{5}}{15}+\frac {47 d^{4} b \,c^{4} x^{4}}{140}-\frac {5 i d^{4} b \,c^{3} x^{3}}{9}-\frac {88 d^{4} b \,c^{2} x^{2}}{105}+\frac {88 b \ln \left (c^{2} x^{2}+1\right ) d^{4}}{105}-\frac {5 i d^{4} b \arctan \left (c x \right )}{3}}{c^{3}}\) | \(234\) |
default | \(\frac {d^{4} a \left (\frac {1}{7} c^{7} x^{7}-\frac {2}{3} i c^{6} x^{6}-\frac {6}{5} c^{5} x^{5}+i c^{4} x^{4}+\frac {1}{3} c^{3} x^{3}\right )+\frac {d^{4} b \arctan \left (c x \right ) c^{7} x^{7}}{7}-\frac {2 i d^{4} b \arctan \left (c x \right ) c^{6} x^{6}}{3}-\frac {6 d^{4} b \arctan \left (c x \right ) c^{5} x^{5}}{5}+i d^{4} b \arctan \left (c x \right ) c^{4} x^{4}+\frac {d^{4} b \arctan \left (c x \right ) c^{3} x^{3}}{3}+\frac {5 i d^{4} b c x}{3}-\frac {d^{4} b \,c^{6} x^{6}}{42}+\frac {2 i d^{4} b \,c^{5} x^{5}}{15}+\frac {47 d^{4} b \,c^{4} x^{4}}{140}-\frac {5 i d^{4} b \,c^{3} x^{3}}{9}-\frac {88 d^{4} b \,c^{2} x^{2}}{105}+\frac {88 b \ln \left (c^{2} x^{2}+1\right ) d^{4}}{105}-\frac {5 i d^{4} b \arctan \left (c x \right )}{3}}{c^{3}}\) | \(234\) |
risch | \(-\frac {3 i d^{4} c^{2} b \,x^{5} \ln \left (-i c x +1\right )}{5}+\frac {i d^{4} c^{4} b \,x^{7} \ln \left (-i c x +1\right )}{14}+\frac {d^{4} c^{4} a \,x^{7}}{7}-\frac {i d^{4} b \left (15 c^{4} x^{7}-70 i c^{3} x^{6}-126 c^{2} x^{5}+105 i c \,x^{4}+35 x^{3}\right ) \ln \left (i c x +1\right )}{210}+\frac {d^{4} c^{3} b \,x^{6} \ln \left (-i c x +1\right )}{3}+\frac {2 i b \,c^{2} d^{4} x^{5}}{15}-\frac {b \,c^{3} d^{4} x^{6}}{42}-\frac {2 i d^{4} c^{3} a \,x^{6}}{3}-\frac {6 d^{4} c^{2} a \,x^{5}}{5}+\frac {i d^{4} b \,x^{3} \ln \left (-i c x +1\right )}{6}-\frac {d^{4} c b \,x^{4} \ln \left (-i c x +1\right )}{2}+i d^{4} c a \,x^{4}+\frac {47 b c \,d^{4} x^{4}}{140}-\frac {5 i b \,d^{4} x^{3}}{9}+\frac {d^{4} a \,x^{3}}{3}-\frac {88 b \,d^{4} x^{2}}{105 c}-\frac {5 i d^{4} b \arctan \left (c x \right )}{3 c^{3}}+\frac {5 i b \,d^{4} x}{3 c^{2}}+\frac {88 d^{4} b \ln \left (c^{2} x^{2}+1\right )}{105 c^{3}}\) | \(311\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 318 vs. \(2 (153) = 306\).
time = 0.47, size = 318, normalized size = 1.65 \begin {gather*} \frac {1}{7} \, a c^{4} d^{4} x^{7} - \frac {2}{3} i \, a c^{3} d^{4} x^{6} - \frac {6}{5} \, a c^{2} d^{4} x^{5} + \frac {1}{84} \, {\left (12 \, x^{7} \arctan \left (c x\right ) - c {\left (\frac {2 \, c^{4} x^{6} - 3 \, c^{2} x^{4} + 6 \, x^{2}}{c^{6}} - \frac {6 \, \log \left (c^{2} x^{2} + 1\right )}{c^{8}}\right )}\right )} b c^{4} d^{4} + i \, a c d^{4} x^{4} - \frac {2}{45} i \, {\left (15 \, x^{6} \arctan \left (c x\right ) - c {\left (\frac {3 \, c^{4} x^{5} - 5 \, c^{2} x^{3} + 15 \, x}{c^{6}} - \frac {15 \, \arctan \left (c x\right )}{c^{7}}\right )}\right )} b c^{3} d^{4} - \frac {3}{10} \, {\left (4 \, x^{5} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{4} - 2 \, x^{2}}{c^{4}} + \frac {2 \, \log \left (c^{2} x^{2} + 1\right )}{c^{6}}\right )}\right )} b c^{2} d^{4} + \frac {1}{3} \, a d^{4} x^{3} + \frac {1}{3} i \, {\left (3 \, x^{4} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{3} - 3 \, x}{c^{4}} + \frac {3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b c d^{4} + \frac {1}{6} \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b d^{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.62, size = 218, normalized size = 1.13 \begin {gather*} \frac {180 \, a c^{7} d^{4} x^{7} - 30 \, {\left (28 i \, a + b\right )} c^{6} d^{4} x^{6} - 168 \, {\left (9 \, a - i \, b\right )} c^{5} d^{4} x^{5} - 9 \, {\left (-140 i \, a - 47 \, b\right )} c^{4} d^{4} x^{4} + 140 \, {\left (3 \, a - 5 i \, b\right )} c^{3} d^{4} x^{3} - 1056 \, b c^{2} d^{4} x^{2} + 2100 i \, b c d^{4} x + 2106 \, b d^{4} \log \left (\frac {c x + i}{c}\right ) + 6 \, b d^{4} \log \left (\frac {c x - i}{c}\right ) - 6 \, {\left (-15 i \, b c^{7} d^{4} x^{7} - 70 \, b c^{6} d^{4} x^{6} + 126 i \, b c^{5} d^{4} x^{5} + 105 \, b c^{4} d^{4} x^{4} - 35 i \, b c^{3} d^{4} x^{3}\right )} \log \left (-\frac {c x + i}{c x - i}\right )}{1260 \, c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 3.11, size = 367, normalized size = 1.90 \begin {gather*} \frac {a c^{4} d^{4} x^{7}}{7} - \frac {88 b d^{4} x^{2}}{105 c} + \frac {5 i b d^{4} x}{3 c^{2}} + \frac {b d^{4} \left (\frac {\log {\left (2299 b c d^{4} x - 2299 i b d^{4} \right )}}{210} + \frac {769 \log {\left (2299 b c d^{4} x + 2299 i b d^{4} \right )}}{560}\right )}{c^{3}} + x^{6} \left (- \frac {2 i a c^{3} d^{4}}{3} - \frac {b c^{3} d^{4}}{42}\right ) + x^{5} \left (- \frac {6 a c^{2} d^{4}}{5} + \frac {2 i b c^{2} d^{4}}{15}\right ) + x^{4} \left (i a c d^{4} + \frac {47 b c d^{4}}{140}\right ) + x^{3} \left (\frac {a d^{4}}{3} - \frac {5 i b d^{4}}{9}\right ) + \left (- \frac {i b c^{4} d^{4} x^{7}}{14} - \frac {b c^{3} d^{4} x^{6}}{3} + \frac {3 i b c^{2} d^{4} x^{5}}{5} + \frac {b c d^{4} x^{4}}{2} - \frac {i b d^{4} x^{3}}{6}\right ) \log {\left (i c x + 1 \right )} + \frac {\left (120 i b c^{7} d^{4} x^{7} + 560 b c^{6} d^{4} x^{6} - 1008 i b c^{5} d^{4} x^{5} - 840 b c^{4} d^{4} x^{4} + 280 i b c^{3} d^{4} x^{3} + 501 b d^{4}\right ) \log {\left (- i c x + 1 \right )}}{1680 c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.64, size = 205, normalized size = 1.06 \begin {gather*} \frac {c^4\,d^4\,\left (180\,a\,x^7+180\,b\,x^7\,\mathrm {atan}\left (c\,x\right )\right )}{1260}+\frac {d^4\,\left (420\,a\,x^3+420\,b\,x^3\,\mathrm {atan}\left (c\,x\right )-b\,x^3\,700{}\mathrm {i}\right )}{1260}-\frac {\frac {d^4\,\left (-1056\,b\,\ln \left (c^2\,x^2+1\right )+b\,\mathrm {atan}\left (c\,x\right )\,2100{}\mathrm {i}\right )}{1260}+\frac {88\,b\,c^2\,d^4\,x^2}{105}-\frac {b\,c\,d^4\,x\,5{}\mathrm {i}}{3}}{c^3}+\frac {c\,d^4\,\left (a\,x^4\,1260{}\mathrm {i}+423\,b\,x^4+b\,x^4\,\mathrm {atan}\left (c\,x\right )\,1260{}\mathrm {i}\right )}{1260}-\frac {c^3\,d^4\,\left (a\,x^6\,840{}\mathrm {i}+30\,b\,x^6+b\,x^6\,\mathrm {atan}\left (c\,x\right )\,840{}\mathrm {i}\right )}{1260}-\frac {c^2\,d^4\,\left (1512\,a\,x^5+1512\,b\,x^5\,\mathrm {atan}\left (c\,x\right )-b\,x^5\,168{}\mathrm {i}\right )}{1260} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________